package com.geezdata.cps.sdk3rd.jushita.request;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.geezdata.cps.sdk3rd.common.request.BaseOrderListRequest;
import com.geezdata.cps.sdk3rd.jushita.constant.Constants;
import com.geezdata.cps.sdk3rd.jushita.response.JushitaFxOrderListResult;
import com.geezdata.cps.sdk3rd.jushita.response.JushitaJxOrderListResult;
import com.geezdata.cps.sdk3rd.jushita.response.JushitaTBOrderListResult;

public class JushitaRequest extends BaseOrderListRequest {
	@NotBlank(message = "methodName 不能为空！")
	private String methodName;
	
	@NotNull(message = "startTime 不能为空！")
	private Date startTime;
	
	@NotNull(message = "endTime 不能为空！")
    private Date endTime;

	private String sellerNick;
    private Integer pageSize;
    private Long lastTid;

	public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }	
	
	public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    } 

	public String getSellerNick() {
        return sellerNick;
    }

    public void setSellerNick(String sellerNick) {
        this.sellerNick = sellerNick;
    }
    
    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
    
    public Long getLastTid() {
        return lastTid;
    }

    public void setLastTid(Long lastTid) {
        this.lastTid = lastTid;
    }
    
    public Class<?> getResponseClass() {
    	Class<?> pClass = null;
    	switch(getMethodName()) {
	    	case Constants.METHOD_JUSHITA_TB_ORDER_SEARCH:
	    		pClass = JushitaTBOrderListResult.class;
	    		break;
	    	case Constants.METHOD_JUSHITA_FX_ORDER_SEARCH:
	    		pClass = JushitaFxOrderListResult.class;
	    		break;
	    	case Constants.METHOD_JUSHITA_JX_ORDER_SEARCH:
	    		pClass = JushitaJxOrderListResult.class;
	    		break;
    	}
    	
    	return pClass;
    }
}
